#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

string add(string s1, string s2) {
    if (s1.size() < s2.size()) swap(s1, s2);
    reverse(s1.begin(), s1.end());
    reverse(s2.begin(), s2.end());
    int m = s1.size(), n = s2.size();

    string ans = "";
    int jin = 0, num = 0;
    for (int i = 0; i < n; i++) {
        num = jin + s1[i] - '0' + s2[i] - '0';
        jin = num / 10;
        num %= 10;
        ans.push_back(num + '0');
    }

    for (int i = n; i < m; i++) {
        num = jin + s1[i] - '0';
        jin = num / 10;
        num %= 10;
        ans.push_back(num + '0');
    }

    if (jin) ans.push_back('1');

    reverse(ans.begin(), ans.end());
    return ans;
}


string sub(string s1, string s2) {
    if (s1 == s2) return "0";

    bool neg = 0;
    if (s1.size() < s2.size() || (s1.size() == s2.size() && s1 < s2)) {
        neg = 1;
        swap(s1, s2);
    }
    reverse(s1.begin(), s1.end());
    reverse(s2.begin(), s2.end());
    int m = s1.size(), n = s2.size();

    string ans = "";
    int jie = 0, num = 0;
    for (int i = 0; i < n; i++) {
        num = s1[i] - s2[i] - jie;
        if (num < 0) {
            ans.push_back(num + 10 + '0');
            jie = 1;
        } else {
            ans.push_back(num + '0');
            jie = 0;
        }
    }

    for (int i = n; i < m; i++) {
        num = s1[i] - '0' - jie;
        if (num < 0) {
            ans.push_back(num + 10 + '0');
            jie = 1;
        } else {
            ans.push_back(num + '0');
            jie = 0;
        }
    }

    while (ans.back() == '0') ans.pop_back();

    if (neg) ans.push_back('-');
    reverse(ans.begin(), ans.end());
    return ans;
}


string mul(string s1, string s2) {
    if(s1 == "0" || s2 == "0") return "0";
    reverse(s1.begin(), s1.end());
    reverse(s2.begin(), s2.end());
    int m = s1.size(), n = s2.size();
    vector<int> nums(m+n, 0);
    for(int i=0;i<m;i++){
        for(int j=0;j<n;j++){
            nums[i+j] += (s1[i] - '0') * (s2[j] - '0' );
            nums[i+j+1] += nums[i+j] / 10;
            nums[i+j] %= 10;
        }
    }
    while(nums.back() == 0) nums.pop_back();
    string ans="";
    for(int i=0;i<nums.size();i++){
        ans.push_back(nums[i] + '0');
    }
    reverse(ans.begin(), ans.end());
    return ans;
}

// 比较复杂
string div(string s1, string s2){
    
}

int main() {
    string s1 = "99", s2 = "99";
    // cin >> s1 >> s2;
    cout << mul(s1, s2) << endl;
    return 0;
}